Skip to content

[cudax][cuco] Migrate host insert_if APIs for fixed_capacity_set - #12356

Merged
PointKernel merged 2 commits into
NVIDIA:mainfrom
PointKernel:cuco-set-insert-if
Nov 10, 2026
Merged

PointKernel merged 2 commits into
NVIDIA:mainfrom
PointKernel:cuco-set-insert-if

Conversation

@PointKernel

@PointKernel PointKernel commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Description

Closes #11134.

This PR migrates the host insert_if and insert_if_async APIs from cuCollections static_set to fixed_capacity_set, reusing the shared open-addressing implementation.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Add host insert_if and insert_if_async to cudax::cuco::fixed_capacity_set,
forwarding to the shared open-addressing implementation, and cover them in
the insert and contains test with a stencil distinct from the keys.
@copy-pr-bot

copy-pr-bot Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Progress in CCCL Oct 30, 2026
@PointKernel PointKernel added cuco cuCollections cudax Feature intended for the cudax experimental library labels Oct 30, 2026
@PointKernel

Copy link
Copy Markdown
Member Author

/ok to test

@github-actions

This comment has been minimized.

@PointKernel
PointKernel marked this pull request as ready for review October 30, 2026 22:54
@PointKernel
PointKernel requested review from a team as code owners October 30, 2026 22:54
@cccl-authenticator-app cccl-authenticator-app Bot moved this from In Progress to In Review in CCCL Oct 30, 2026
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: NVIDIA/cccl
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 04e3048
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 108a3f3f-876a-4cf9-a3f7-a3db309c2f13
Commits

Reviewing files that changed from the base of the PR and between 0f90671 and a9845ab.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features
    • Added conditional bulk insertion to fixed-capacity sets, selecting keys according to a predicate applied to corresponding stencil values.
    • Synchronous insertion reports the number of newly added keys; asynchronous insertion runs without returning a count. Both skip duplicates and keys that cannot fit.
    • Added coverage for synchronous and asynchronous conditional insertion, including verifying which keys are present afterward.

The fixed-capacity set adds synchronous and asynchronous stencil-predicated insertion APIs. Tests check the inserted-key count and membership for keys selected by a predicate.

Changes: Conditional insertion

Layer / File(s) Summary
Insertion APIs and validation
cudax/include/cuda/experimental/__cuco/fixed_capacity_set.cuh, cudax/test/cuco/fixed_capacity_set/test_insert_and_contains.cu
Adds synchronous and asynchronous stencil-predicated insertion methods. Tests check the synchronous insertion count and verify membership after both calls.

Assessment against linked issues

Objective Addressed Explanation
Migrate host insert_if APIs to fixed_capacity_set and add tests [#11134] ✅

Possibly related PRs

  • NVIDIA/cccl#11869: Adds the fixed_capacity_set APIs and shared implementation that these insertion methods extend.

Suggested reviewers: gevtushenko, srinivasyadav18, sleeepyjack

Change: Feature

Merge Risk: Minimal · previous review 0f906

No merge-blocking risk was identified.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: NVIDIA/cccl
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 895ecb9
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 9d8238f4-5e7a-46e0-82f4-bec2bda52b63
Commits

Reviewing files that changed from the base of the PR and between 895ecb9 and 0f90671.

Files selected for processing: 2

  • cudax/include/cuda/experimental/__cuco/fixed_capacity_set.cuh
  • cudax/test/cuco/fixed_capacity_set/test_insert_and_contains.cu

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@PointKernel PointKernel self-assigned this Nov 3, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 1h 14m: Pass: 100%/75 | Total: 1d 06h | Max: 1h 14m | Hits: 76%/664225

See results here.

@PointKernel
PointKernel merged commit dd063b7 into NVIDIA:main Nov 10, 2026
95 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL Nov 10, 2026
@PointKernel
PointKernel deleted the cuco-set-insert-if branch November 10, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuco cuCollections cudax Feature intended for the cudax experimental library

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[CUCO][FEA]: Migrate host insert_if APIs for fixed_capacity_set

3 participants